<template>
    <div class="container">
         <Header :parentId="id" @func = "onShow" :title="'管家详情'"/>
         <!-- {{dataFrom.age}} -->
         {{comment}}
       <div class="steward-box">
            <div class="steward-item">
                <div class="pic">
                    <img src="../../images/8.jpg" alt="">
                </div>
                <div class="steward-right">
                    <p><span class="user">管家名字</span><span class="position">中医调理师</span><span class="detail">查看详情</span></p>
                    <p>擅长:疾病</p>
                    <p>相关证书:职业证书、资格证书等</p>
                    <p class="server">服务 220次 | 从业 12年</p>
                </div>
            </div>
        </div>
        <!-- 用户评价 -->
        <div class="comment-box">
            <div class="title">
                <span>用户评价</span>
                <span class="write-comment" @click="onComment">写评论</span>
            </div>
            <div class="comment-list">
                <div class="comment-item">
                    <div class="pic">
                        <img src="../../images/img_04.png" alt="">
                    </div>
                    <div class="comment-del">
                        <p class="comment-top"><span class="user">小爱同学</span><span>2018-02-09 13:02</span></p>
                        <p>评论内容</p>
                    </div>
                </div>

                 <div class="comment-item">
                    <div class="pic">
                        <img src="../../images/img_04.png" alt="">
                    </div>
                    <div class="comment-del">
                        <p class="comment-top"><span class="user">小爱同学</span><span>2018-02-09 13:02</span></p>
                        <p>评论内容</p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>
<script>
import Header from "../comments/header.vue";
import Bus from '../eventBus.js'
export default {
  data(e) {
    // console.log(e.$route.params.id)
    return {
      id: e.$route.params.id,
      dataFrom:'',
      comment:''
    };
  },
  mounted(){
      var that = this
      Bus.$on('func',function(comment){
          console.log(comment)
          that.comment = comment
      })

  },
  methods: {
    onComment() {
      this.$router.push("/doctorDynamic-detail/comment/");
    },
    onShow(msg){
        this.dataFrom = msg
    }
   
  },
  components: {
    Header: Header
  }
};
</script>
<style scoped>
.mint-header {
  background: #7fffaa;
  font-size: 20px;
  height: 50px;
  border-bottom: 1px solid #fff;
}
.pic img {
  width: 72px;
  height: 72px;
  margin-top: 4px;
}
.steward-box {
  /* padding: 5px; */
}
.steward-item {
  display: flex;
  background-color: #fff;
  align-items: center;
  padding: 0 10px;
  box-shadow: 0 0 10px #ccc;
  margin-bottom: 10px;
}
.steward-right {
  width: 100%;
  position: relative;
  margin-left: 10px;
  padding: 5px 0;
}
.steward-right img {
  position: absolute;
  right: 0;
  top: 20px;
  width: 12px;
  height: 20px;
}
.steward-right .user {
  font-weight: 600;
}
.steward-right p {
  margin: 0;
}
.steward-right .position {
  margin-left: 10px;
}
.steward-right .detail {
  margin-left: 10px;
  padding: 2px 5px;
  background-color: #ccc;
  font-size: 6px;
  color: red;
  border-radius: 3px;
  float: right;
}
.server {
  color: red;
}
.comment-item {
  display: flex;
  border-bottom: 1px solid #9e9e9e54;
  padding: 0 10px;
  background-color: #fff;
}
.title {
  padding: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid #ccc;
  background-color: #ffff;
}
.title span {
  border-left: 3px solid red;
  padding-left: 5px;
}
.title .write-comment {
  float: right;
  background-color: #ccc;
  padding: 2px 5px;
  border-radius: 5px;
  color: red;
  font-size: 10px;
  border-left: none;
}
.comment-del {
  width: 100%;
  padding: 5px;
}
.comment-top {
  display: flex;
  justify-content: space-between;
}
.comment-top .user {
  border-bottom: 1px solid red;
  padding-bottom: 1px;
}
.comment-item .pic img {
  width: 50px;
  height: 50px;
}
</style>


